package b.g.b.h;

import androidx.constraintlayout.widget.ConstraintLayout;
import b.d.i;
import b.g.b.d;
import b.g.b.h.l.b;
import b.g.b.h.l.b.a;
import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;

/* compiled from: ConstraintWidgetContainer */
public class e extends k {
    public WeakReference<c> A0 = null;
    public WeakReference<c> B0 = null;
    public WeakReference<c> C0 = null;
    public WeakReference<c> D0 = null;
    public a E0 = new a();
    public b m0 = new b(this);
    public b.g.b.h.l.e n0 = new b.g.b.h.l.e(this);
    public b.b o0 = null;
    public boolean p0 = false;
    public d q0 = new d();
    public int r0;
    public int s0;
    public int t0 = 0;
    public int u0 = 0;
    public b[] v0 = new b[4];
    public b[] w0 = new b[4];
    public int x0 = 257;
    public boolean y0 = false;
    public boolean z0 = false;

    public static boolean X(d dVar, b.b bVar, a aVar, int i) {
        d.a aVar2 = d.a.WRAP_CONTENT;
        d.a aVar3 = d.a.FIXED;
        if (bVar == null) {
            return false;
        }
        aVar.a = dVar.m();
        aVar.b = dVar.q();
        aVar.c = dVar.r();
        aVar.d = dVar.l();
        aVar.i = false;
        aVar.j = i;
        d.a aVar4 = aVar.a;
        d.a aVar5 = d.a.MATCH_CONSTRAINT;
        Object obj = aVar4 == aVar5 ? 1 : null;
        Object obj2 = aVar.b == aVar5 ? 1 : null;
        Object obj3 = (obj == null || dVar.S <= 0.0f) ? null : 1;
        Object obj4 = (obj2 == null || dVar.S <= 0.0f) ? null : 1;
        if (obj != null && dVar.u(0) && dVar.l == 0 && obj3 == null) {
            aVar.a = aVar2;
            if (obj2 != null && dVar.m == 0) {
                aVar.a = aVar3;
            }
            obj = null;
        }
        if (obj2 != null && dVar.u(1) && dVar.m == 0 && obj4 == null) {
            aVar.b = aVar2;
            if (obj != null && dVar.l == 0) {
                aVar.b = aVar3;
            }
            obj2 = null;
        }
        if (dVar.z()) {
            aVar.a = aVar3;
            obj = null;
        }
        if (dVar.A()) {
            aVar.b = aVar3;
            obj2 = null;
        }
        if (obj3 != null) {
            if (dVar.n[0] == 4) {
                aVar.a = aVar3;
            } else if (obj2 == null) {
                int i2;
                if (aVar.b == aVar3) {
                    i2 = aVar.d;
                } else {
                    aVar.a = aVar2;
                    ((ConstraintLayout.a) bVar).b(dVar, aVar);
                    i2 = aVar.f;
                }
                aVar.a = aVar3;
                int i3 = dVar.T;
                if (i3 == 0 || i3 == -1) {
                    aVar.c = (int) (dVar.S * ((float) i2));
                } else {
                    aVar.c = (int) (dVar.S / ((float) i2));
                }
            }
        }
        if (obj4 != null) {
            if (dVar.n[1] == 4) {
                aVar.b = aVar3;
            } else if (obj == null) {
                if (aVar.a == aVar3) {
                    i = aVar.c;
                } else {
                    aVar.b = aVar2;
                    ((ConstraintLayout.a) bVar).b(dVar, aVar);
                    i = aVar.e;
                }
                aVar.b = aVar3;
                int i4 = dVar.T;
                if (i4 == 0 || i4 == -1) {
                    aVar.d = (int) (((float) i) / dVar.S);
                } else {
                    aVar.d = (int) (((float) i) * dVar.S);
                }
            }
        }
        ((ConstraintLayout.a) bVar).b(dVar, aVar);
        dVar.M(aVar.e);
        dVar.H(aVar.f);
        dVar.y = aVar.h;
        dVar.E(aVar.g);
        aVar.j = 0;
        return aVar.i;
    }

    public void B() {
        this.q0.u();
        this.r0 = 0;
        this.s0 = 0;
        super.B();
    }

    public void N(boolean z, boolean z2) {
        super.N(z, z2);
        int size = this.l0.size();
        for (int i = 0; i < size; i++) {
            ((d) this.l0.get(i)).N(z, z2);
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:383:0x0692  */
    /* JADX WARNING: Removed duplicated region for block: B:389:0x06af  */
    /* JADX WARNING: Removed duplicated region for block: B:486:0x08e0  */
    /* JADX WARNING: Removed duplicated region for block: B:358:0x0627  */
    /* JADX WARNING: Removed duplicated region for block: B:353:0x0611  */
    /* JADX WARNING: Removed duplicated region for block: B:367:0x0659  */
    /* JADX WARNING: Removed duplicated region for block: B:377:0x067e  */
    /* JADX WARNING: Removed duplicated region for block: B:383:0x0692  */
    /* JADX WARNING: Removed duplicated region for block: B:389:0x06af  */
    /* JADX WARNING: Removed duplicated region for block: B:486:0x08e0  */
    /* JADX WARNING: Removed duplicated region for block: B:361:0x062c  */
    /* JADX WARNING: Removed duplicated region for block: B:342:0x05f0  */
    /* JADX WARNING: Removed duplicated region for block: B:324:0x05b6  */
    /* JADX WARNING: Removed duplicated region for block: B:342:0x05f0  */
    /* JADX WARNING: Removed duplicated region for block: B:361:0x062c  */
    /* JADX WARNING: Removed duplicated region for block: B:361:0x062c  */
    /* JADX WARNING: Removed duplicated region for block: B:342:0x05f0  */
    /* JADX WARNING: Removed duplicated region for block: B:367:0x0659  */
    /* JADX WARNING: Removed duplicated region for block: B:377:0x067e  */
    /* JADX WARNING: Removed duplicated region for block: B:383:0x0692  */
    /* JADX WARNING: Removed duplicated region for block: B:389:0x06af  */
    /* JADX WARNING: Removed duplicated region for block: B:486:0x08e0  */
    /* JADX WARNING: Removed duplicated region for block: B:440:0x07e2  */
    /* JADX WARNING: Removed duplicated region for block: B:437:0x07ba  */
    /* JADX WARNING: Removed duplicated region for block: B:464:0x0873  */
    /* JADX WARNING: Removed duplicated region for block: B:468:0x089a  */
    /* JADX WARNING: Removed duplicated region for block: B:467:0x088e  */
    /* JADX WARNING: Removed duplicated region for block: B:470:0x089d  */
    /* JADX WARNING: Removed duplicated region for block: B:437:0x07ba  */
    /* JADX WARNING: Removed duplicated region for block: B:440:0x07e2  */
    /* JADX WARNING: Removed duplicated region for block: B:444:0x07fc  */
    /* JADX WARNING: Removed duplicated region for block: B:464:0x0873  */
    /* JADX WARNING: Removed duplicated region for block: B:467:0x088e  */
    /* JADX WARNING: Removed duplicated region for block: B:468:0x089a  */
    /* JADX WARNING: Removed duplicated region for block: B:470:0x089d  */
    /* JADX WARNING: Removed duplicated region for block: B:440:0x07e2  */
    /* JADX WARNING: Removed duplicated region for block: B:437:0x07ba  */
    /* JADX WARNING: Removed duplicated region for block: B:444:0x07fc  */
    /* JADX WARNING: Removed duplicated region for block: B:464:0x0873  */
    /* JADX WARNING: Removed duplicated region for block: B:468:0x089a  */
    /* JADX WARNING: Removed duplicated region for block: B:467:0x088e  */
    /* JADX WARNING: Removed duplicated region for block: B:470:0x089d  */
    /* JADX WARNING: Removed duplicated region for block: B:437:0x07ba  */
    /* JADX WARNING: Removed duplicated region for block: B:440:0x07e2  */
    /* JADX WARNING: Removed duplicated region for block: B:444:0x07fc  */
    /* JADX WARNING: Removed duplicated region for block: B:464:0x0873  */
    /* JADX WARNING: Removed duplicated region for block: B:467:0x088e  */
    /* JADX WARNING: Removed duplicated region for block: B:468:0x089a  */
    /* JADX WARNING: Removed duplicated region for block: B:470:0x089d  */
    public void P() {
        /*
        r28 = this;
        r1 = r28;
        r2 = b.g.b.h.i.a;
        r0 = b.g.b.h.d.a.MATCH_CONSTRAINT;
        r3 = b.g.b.h.d.a.WRAP_CONTENT;
        r4 = b.g.b.h.d.a.FIXED;
        r5 = 0;
        r1.U = r5;
        r1.V = r5;
        r1.y0 = r5;
        r1.z0 = r5;
        r6 = r1.l0;
        r6 = r6.size();
        r7 = r28.r();
        r7 = java.lang.Math.max(r5, r7);
        r8 = r28.l();
        r8 = java.lang.Math.max(r5, r8);
        r9 = r1.O;
        r10 = 1;
        r11 = r9[r10];
        r9 = r9[r5];
        r12 = r1.x0;
        r12 = b.g.b.h.i.b(r12, r10);
        if (r12 == 0) goto L_0x024e;
    L_0x0038:
        r12 = r1.o0;
        r13 = r28.m();
        r14 = r28.q();
        r28.C();
        r15 = r1.l0;
        r10 = r15.size();
    L_0x004b:
        if (r5 >= r10) goto L_0x0059;
    L_0x004d:
        r16 = r15.get(r5);
        r16 = (b.g.b.h.d) r16;
        r16.C();
        r5 = r5 + 1;
        goto L_0x004b;
    L_0x0059:
        r5 = r1.p0;
        if (r13 != r4) goto L_0x006a;
    L_0x005d:
        r13 = r28.r();
        r16 = r2;
        r2 = 0;
        r1.F(r2, r13);
        r17 = r8;
        goto L_0x0078;
    L_0x006a:
        r16 = r2;
        r2 = 0;
        r13 = r1.D;
        r13.b = r2;
        r17 = r8;
        r8 = 1;
        r13.c = r8;
        r1.U = r2;
    L_0x0078:
        r2 = 0;
        r8 = 0;
        r13 = 0;
    L_0x007b:
        r18 = 1056964608; // 0x3f000000 float:0.5 double:5.222099017E-315;
        r19 = r7;
        if (r8 >= r10) goto L_0x00e5;
    L_0x0081:
        r20 = r15.get(r8);
        r7 = r20;
        r7 = (b.g.b.h.d) r7;
        r20 = r11;
        r11 = r7 instanceof b.g.b.h.f;
        if (r11 == 0) goto L_0x00cd;
    L_0x008f:
        r7 = (b.g.b.h.f) r7;
        r11 = r7.p0;
        r22 = r3;
        r3 = 1;
        if (r11 != r3) goto L_0x00dc;
    L_0x0098:
        r2 = r7.m0;
        r3 = -1;
        if (r2 == r3) goto L_0x00a1;
    L_0x009d:
        r7.P(r2);
        goto L_0x00cb;
    L_0x00a1:
        r2 = r7.n0;
        if (r2 == r3) goto L_0x00b6;
    L_0x00a5:
        r2 = r28.z();
        if (r2 == 0) goto L_0x00b6;
    L_0x00ab:
        r2 = r28.r();
        r3 = r7.n0;
        r2 = r2 - r3;
        r7.P(r2);
        goto L_0x00cb;
    L_0x00b6:
        r2 = r28.z();
        if (r2 == 0) goto L_0x00cb;
    L_0x00bc:
        r2 = r7.l0;
        r3 = r28.r();
        r3 = (float) r3;
        r2 = r2 * r3;
        r2 = r2 + r18;
        r2 = (int) r2;
        r7.P(r2);
    L_0x00cb:
        r2 = 1;
        goto L_0x00dc;
    L_0x00cd:
        r22 = r3;
        r3 = r7 instanceof b.g.b.h.a;
        if (r3 == 0) goto L_0x00dc;
    L_0x00d3:
        r7 = (b.g.b.h.a) r7;
        r3 = r7.R();
        if (r3 != 0) goto L_0x00dc;
    L_0x00db:
        r13 = 1;
    L_0x00dc:
        r8 = r8 + 1;
        r7 = r19;
        r11 = r20;
        r3 = r22;
        goto L_0x007b;
    L_0x00e5:
        r22 = r3;
        r20 = r11;
        if (r2 == 0) goto L_0x0105;
    L_0x00eb:
        r2 = 0;
    L_0x00ec:
        if (r2 >= r10) goto L_0x0105;
    L_0x00ee:
        r3 = r15.get(r2);
        r3 = (b.g.b.h.d) r3;
        r7 = r3 instanceof b.g.b.h.f;
        if (r7 == 0) goto L_0x0102;
    L_0x00f8:
        r3 = (b.g.b.h.f) r3;
        r7 = r3.p0;
        r8 = 1;
        if (r7 != r8) goto L_0x0102;
    L_0x00ff:
        b.g.b.h.l.h.b(r3, r12, r5);
    L_0x0102:
        r2 = r2 + 1;
        goto L_0x00ec;
    L_0x0105:
        b.g.b.h.l.h.b(r1, r12, r5);
        if (r13 == 0) goto L_0x012b;
    L_0x010a:
        r2 = 0;
    L_0x010b:
        if (r2 >= r10) goto L_0x012b;
    L_0x010d:
        r3 = r15.get(r2);
        r3 = (b.g.b.h.d) r3;
        r7 = r3 instanceof b.g.b.h.a;
        if (r7 == 0) goto L_0x0128;
    L_0x0117:
        r3 = (b.g.b.h.a) r3;
        r7 = r3.R();
        if (r7 != 0) goto L_0x0128;
    L_0x011f:
        r7 = r3.Q();
        if (r7 == 0) goto L_0x0128;
    L_0x0125:
        b.g.b.h.l.h.b(r3, r12, r5);
    L_0x0128:
        r2 = r2 + 1;
        goto L_0x010b;
    L_0x012b:
        if (r14 != r4) goto L_0x0136;
    L_0x012d:
        r2 = r28.l();
        r3 = 0;
        r1.G(r3, r2);
        goto L_0x0140;
    L_0x0136:
        r3 = 0;
        r2 = r1.E;
        r2.b = r3;
        r7 = 1;
        r2.c = r7;
        r1.V = r3;
    L_0x0140:
        r2 = 0;
        r3 = 0;
        r7 = 0;
    L_0x0143:
        if (r7 >= r10) goto L_0x019e;
    L_0x0145:
        r8 = r15.get(r7);
        r8 = (b.g.b.h.d) r8;
        r11 = r8 instanceof b.g.b.h.f;
        if (r11 == 0) goto L_0x018c;
    L_0x014f:
        r8 = (b.g.b.h.f) r8;
        r11 = r8.p0;
        if (r11 != 0) goto L_0x018a;
    L_0x0155:
        r2 = r8.m0;
        r11 = -1;
        if (r2 == r11) goto L_0x015e;
    L_0x015a:
        r8.P(r2);
        goto L_0x0188;
    L_0x015e:
        r2 = r8.n0;
        if (r2 == r11) goto L_0x0173;
    L_0x0162:
        r2 = r28.A();
        if (r2 == 0) goto L_0x0173;
    L_0x0168:
        r2 = r28.l();
        r13 = r8.n0;
        r2 = r2 - r13;
        r8.P(r2);
        goto L_0x0188;
    L_0x0173:
        r2 = r28.A();
        if (r2 == 0) goto L_0x0188;
    L_0x0179:
        r2 = r8.l0;
        r13 = r28.l();
        r13 = (float) r13;
        r2 = r2 * r13;
        r2 = r2 + r18;
        r2 = (int) r2;
        r8.P(r2);
    L_0x0188:
        r2 = 1;
        goto L_0x019b;
    L_0x018a:
        r11 = -1;
        goto L_0x019b;
    L_0x018c:
        r11 = -1;
        r13 = r8 instanceof b.g.b.h.a;
        if (r13 == 0) goto L_0x019b;
    L_0x0191:
        r8 = (b.g.b.h.a) r8;
        r8 = r8.R();
        r13 = 1;
        if (r8 != r13) goto L_0x019b;
    L_0x019a:
        r3 = 1;
    L_0x019b:
        r7 = r7 + 1;
        goto L_0x0143;
    L_0x019e:
        if (r2 == 0) goto L_0x01b9;
    L_0x01a0:
        r2 = 0;
    L_0x01a1:
        if (r2 >= r10) goto L_0x01b9;
    L_0x01a3:
        r7 = r15.get(r2);
        r7 = (b.g.b.h.d) r7;
        r8 = r7 instanceof b.g.b.h.f;
        if (r8 == 0) goto L_0x01b6;
    L_0x01ad:
        r7 = (b.g.b.h.f) r7;
        r8 = r7.p0;
        if (r8 != 0) goto L_0x01b6;
    L_0x01b3:
        b.g.b.h.l.h.g(r7, r12);
    L_0x01b6:
        r2 = r2 + 1;
        goto L_0x01a1;
    L_0x01b9:
        b.g.b.h.l.h.g(r1, r12);
        if (r3 == 0) goto L_0x01e0;
    L_0x01be:
        r2 = 0;
    L_0x01bf:
        if (r2 >= r10) goto L_0x01e0;
    L_0x01c1:
        r3 = r15.get(r2);
        r3 = (b.g.b.h.d) r3;
        r7 = r3 instanceof b.g.b.h.a;
        if (r7 == 0) goto L_0x01dd;
    L_0x01cb:
        r3 = (b.g.b.h.a) r3;
        r7 = r3.R();
        r8 = 1;
        if (r7 != r8) goto L_0x01dd;
    L_0x01d4:
        r7 = r3.Q();
        if (r7 == 0) goto L_0x01dd;
    L_0x01da:
        b.g.b.h.l.h.g(r3, r12);
    L_0x01dd:
        r2 = r2 + 1;
        goto L_0x01bf;
    L_0x01e0:
        r2 = 0;
    L_0x01e1:
        if (r2 >= r10) goto L_0x0204;
    L_0x01e3:
        r3 = r15.get(r2);
        r3 = (b.g.b.h.d) r3;
        r7 = r3.y();
        if (r7 == 0) goto L_0x0201;
    L_0x01ef:
        r7 = b.g.b.h.l.h.a(r3);
        if (r7 == 0) goto L_0x0201;
    L_0x01f5:
        r7 = b.g.b.h.l.h.a;
        r8 = 0;
        X(r3, r12, r7, r8);
        b.g.b.h.l.h.b(r3, r12, r5);
        b.g.b.h.l.h.g(r3, r12);
    L_0x0201:
        r2 = r2 + 1;
        goto L_0x01e1;
    L_0x0204:
        r2 = 0;
    L_0x0205:
        if (r2 >= r6) goto L_0x0258;
    L_0x0207:
        r3 = r1.l0;
        r3 = r3.get(r2);
        r3 = (b.g.b.h.d) r3;
        r5 = r3.y();
        if (r5 == 0) goto L_0x024b;
    L_0x0215:
        r5 = r3 instanceof b.g.b.h.f;
        if (r5 != 0) goto L_0x024b;
    L_0x0219:
        r5 = r3 instanceof b.g.b.h.a;
        if (r5 != 0) goto L_0x024b;
    L_0x021d:
        r5 = r3 instanceof b.g.b.h.j;
        if (r5 != 0) goto L_0x024b;
    L_0x0221:
        r5 = r3.A;
        if (r5 != 0) goto L_0x024b;
    L_0x0225:
        r5 = 0;
        r7 = r3.k(r5);
        r5 = 1;
        r8 = r3.k(r5);
        if (r7 != r0) goto L_0x023d;
    L_0x0231:
        r7 = r3.l;
        if (r7 == r5) goto L_0x023d;
    L_0x0235:
        if (r8 != r0) goto L_0x023d;
    L_0x0237:
        r7 = r3.m;
        if (r7 == r5) goto L_0x023d;
    L_0x023b:
        r5 = 1;
        goto L_0x023e;
    L_0x023d:
        r5 = 0;
    L_0x023e:
        if (r5 != 0) goto L_0x024b;
    L_0x0240:
        r5 = new b.g.b.h.l.b$a;
        r5.m418init();
        r7 = r1.o0;
        r8 = 0;
        X(r3, r7, r5, r8);
    L_0x024b:
        r2 = r2 + 1;
        goto L_0x0205;
    L_0x024e:
        r16 = r2;
        r22 = r3;
        r19 = r7;
        r17 = r8;
        r20 = r11;
    L_0x0258:
        r2 = 2;
        if (r6 <= r2) goto L_0x0641;
    L_0x025b:
        r5 = r22;
        r7 = r20;
        if (r9 == r5) goto L_0x0263;
    L_0x0261:
        if (r7 != r5) goto L_0x0635;
    L_0x0263:
        r8 = r1.x0;
        r10 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;
        r8 = b.g.b.h.i.b(r8, r10);
        if (r8 == 0) goto L_0x0635;
    L_0x026d:
        r8 = r1.o0;
        r10 = b.g.b.h.c.a.CENTER;
        r11 = r1.l0;
        r12 = r11.size();
        r13 = 0;
    L_0x0278:
        if (r13 >= r12) goto L_0x02a5;
    L_0x027a:
        r14 = r11.get(r13);
        r14 = (b.g.b.h.d) r14;
        r15 = r28.m();
        r2 = r28.q();
        r3 = r14.m();
        r14 = r14.q();
        r2 = b.d.i.d(r15, r2, r3, r14);
        if (r2 != 0) goto L_0x02a1;
    L_0x0296:
        r26 = r4;
        r4 = r5;
        r24 = r6;
        r23 = r7;
        r25 = r9;
        goto L_0x05eb;
    L_0x02a1:
        r13 = r13 + 1;
        r2 = 2;
        goto L_0x0278;
    L_0x02a5:
        r2 = 0;
        r3 = 0;
        r13 = 0;
        r14 = 0;
        r15 = 0;
        r21 = 0;
        r22 = 0;
    L_0x02ae:
        if (r2 >= r12) goto L_0x039c;
    L_0x02b0:
        r23 = r11.get(r2);
        r24 = r6;
        r6 = r23;
        r6 = (b.g.b.h.d) r6;
        r23 = r7;
        r7 = r28.m();
        r25 = r9;
        r9 = r28.q();
        r26 = r4;
        r4 = r6.m();
        r27 = r5;
        r5 = r6.q();
        r4 = b.d.i.d(r7, r9, r4, r5);
        if (r4 != 0) goto L_0x02de;
    L_0x02d8:
        r4 = r1.E0;
        r5 = 0;
        X(r6, r8, r4, r5);
    L_0x02de:
        r4 = r6 instanceof b.g.b.h.f;
        if (r4 == 0) goto L_0x0303;
    L_0x02e2:
        r5 = r6;
        r5 = (b.g.b.h.f) r5;
        r7 = r5.p0;
        if (r7 != 0) goto L_0x02f4;
    L_0x02e9:
        if (r14 != 0) goto L_0x02f1;
    L_0x02eb:
        r7 = new java.util.ArrayList;
        r7.<init>();
        r14 = r7;
    L_0x02f1:
        r14.add(r5);
    L_0x02f4:
        r7 = r5.p0;
        r9 = 1;
        if (r7 != r9) goto L_0x0303;
    L_0x02f9:
        if (r3 != 0) goto L_0x0300;
    L_0x02fb:
        r3 = new java.util.ArrayList;
        r3.<init>();
    L_0x0300:
        r3.add(r5);
    L_0x0303:
        r5 = r6 instanceof b.g.b.h.h;
        if (r5 == 0) goto L_0x0348;
    L_0x0307:
        r5 = r6 instanceof b.g.b.h.a;
        if (r5 == 0) goto L_0x0331;
    L_0x030b:
        r5 = r6;
        r5 = (b.g.b.h.a) r5;
        r7 = r5.R();
        if (r7 != 0) goto L_0x031f;
    L_0x0314:
        if (r13 != 0) goto L_0x031c;
    L_0x0316:
        r7 = new java.util.ArrayList;
        r7.<init>();
        r13 = r7;
    L_0x031c:
        r13.add(r5);
    L_0x031f:
        r7 = r5.R();
        r9 = 1;
        if (r7 != r9) goto L_0x0348;
    L_0x0326:
        if (r15 != 0) goto L_0x032d;
    L_0x0328:
        r15 = new java.util.ArrayList;
        r15.<init>();
    L_0x032d:
        r15.add(r5);
        goto L_0x0348;
    L_0x0331:
        r5 = r6;
        r5 = (b.g.b.h.h) r5;
        if (r13 != 0) goto L_0x033b;
    L_0x0336:
        r13 = new java.util.ArrayList;
        r13.<init>();
    L_0x033b:
        r13.add(r5);
        if (r15 != 0) goto L_0x0345;
    L_0x0340:
        r15 = new java.util.ArrayList;
        r15.<init>();
    L_0x0345:
        r15.add(r5);
    L_0x0348:
        r5 = r6.D;
        r5 = r5.f;
        if (r5 != 0) goto L_0x0368;
    L_0x034e:
        r5 = r6.F;
        r5 = r5.f;
        if (r5 != 0) goto L_0x0368;
    L_0x0354:
        if (r4 != 0) goto L_0x0368;
    L_0x0356:
        r5 = r6 instanceof b.g.b.h.a;
        if (r5 != 0) goto L_0x0368;
    L_0x035a:
        if (r21 != 0) goto L_0x0361;
    L_0x035c:
        r21 = new java.util.ArrayList;
        r21.<init>();
    L_0x0361:
        r5 = r21;
        r5.add(r6);
        r21 = r5;
    L_0x0368:
        r5 = r6.E;
        r5 = r5.f;
        if (r5 != 0) goto L_0x038e;
    L_0x036e:
        r5 = r6.G;
        r5 = r5.f;
        if (r5 != 0) goto L_0x038e;
    L_0x0374:
        r5 = r6.H;
        r5 = r5.f;
        if (r5 != 0) goto L_0x038e;
    L_0x037a:
        if (r4 != 0) goto L_0x038e;
    L_0x037c:
        r4 = r6 instanceof b.g.b.h.a;
        if (r4 != 0) goto L_0x038e;
    L_0x0380:
        if (r22 != 0) goto L_0x0387;
    L_0x0382:
        r22 = new java.util.ArrayList;
        r22.<init>();
    L_0x0387:
        r4 = r22;
        r4.add(r6);
        r22 = r4;
    L_0x038e:
        r2 = r2 + 1;
        r7 = r23;
        r6 = r24;
        r9 = r25;
        r4 = r26;
        r5 = r27;
        goto L_0x02ae;
    L_0x039c:
        r26 = r4;
        r27 = r5;
        r24 = r6;
        r23 = r7;
        r25 = r9;
        r2 = new java.util.ArrayList;
        r2.<init>();
        if (r3 == 0) goto L_0x03c3;
    L_0x03ad:
        r3 = r3.iterator();
    L_0x03b1:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x03c3;
    L_0x03b7:
        r4 = r3.next();
        r4 = (b.g.b.h.f) r4;
        r5 = 0;
        r6 = 0;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x03b1;
    L_0x03c3:
        r5 = 0;
        r6 = 0;
        if (r13 == 0) goto L_0x03e4;
    L_0x03c7:
        r3 = r13.iterator();
    L_0x03cb:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x03e4;
    L_0x03d1:
        r4 = r3.next();
        r4 = (b.g.b.h.h) r4;
        r7 = b.d.i.b(r4, r6, r2, r5);
        r4.P(r2, r6, r7);
        r7.b(r2);
        r5 = 0;
        r6 = 0;
        goto L_0x03cb;
    L_0x03e4:
        r3 = b.g.b.h.c.a.LEFT;
        r3 = r1.i(r3);
        r3 = r3.a;
        if (r3 == 0) goto L_0x0406;
    L_0x03ee:
        r3 = r3.iterator();
    L_0x03f2:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x0406;
    L_0x03f8:
        r4 = r3.next();
        r4 = (b.g.b.h.c) r4;
        r4 = r4.d;
        r5 = 0;
        r6 = 0;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x03f2;
    L_0x0406:
        r3 = b.g.b.h.c.a.RIGHT;
        r3 = r1.i(r3);
        r3 = r3.a;
        if (r3 == 0) goto L_0x0428;
    L_0x0410:
        r3 = r3.iterator();
    L_0x0414:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x0428;
    L_0x041a:
        r4 = r3.next();
        r4 = (b.g.b.h.c) r4;
        r4 = r4.d;
        r5 = 0;
        r6 = 0;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x0414;
    L_0x0428:
        r3 = r1.i(r10);
        r3 = r3.a;
        if (r3 == 0) goto L_0x0448;
    L_0x0430:
        r3 = r3.iterator();
    L_0x0434:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x0448;
    L_0x043a:
        r4 = r3.next();
        r4 = (b.g.b.h.c) r4;
        r4 = r4.d;
        r5 = 0;
        r6 = 0;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x0434;
    L_0x0448:
        r5 = 0;
        r6 = 0;
        if (r21 == 0) goto L_0x0460;
    L_0x044c:
        r3 = r21.iterator();
    L_0x0450:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x0460;
    L_0x0456:
        r4 = r3.next();
        r4 = (b.g.b.h.d) r4;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x0450;
    L_0x0460:
        if (r14 == 0) goto L_0x0477;
    L_0x0462:
        r3 = r14.iterator();
    L_0x0466:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x0477;
    L_0x046c:
        r4 = r3.next();
        r4 = (b.g.b.h.f) r4;
        r6 = 1;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x0466;
    L_0x0477:
        r6 = 1;
        if (r15 == 0) goto L_0x0497;
    L_0x047a:
        r3 = r15.iterator();
    L_0x047e:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x0497;
    L_0x0484:
        r4 = r3.next();
        r4 = (b.g.b.h.h) r4;
        r7 = b.d.i.b(r4, r6, r2, r5);
        r4.P(r2, r6, r7);
        r7.b(r2);
        r5 = 0;
        r6 = 1;
        goto L_0x047e;
    L_0x0497:
        r3 = b.g.b.h.c.a.TOP;
        r3 = r1.i(r3);
        r3 = r3.a;
        if (r3 == 0) goto L_0x04b9;
    L_0x04a1:
        r3 = r3.iterator();
    L_0x04a5:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x04b9;
    L_0x04ab:
        r4 = r3.next();
        r4 = (b.g.b.h.c) r4;
        r4 = r4.d;
        r5 = 0;
        r6 = 1;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x04a5;
    L_0x04b9:
        r3 = b.g.b.h.c.a.BASELINE;
        r3 = r1.i(r3);
        r3 = r3.a;
        if (r3 == 0) goto L_0x04db;
    L_0x04c3:
        r3 = r3.iterator();
    L_0x04c7:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x04db;
    L_0x04cd:
        r4 = r3.next();
        r4 = (b.g.b.h.c) r4;
        r4 = r4.d;
        r5 = 0;
        r6 = 1;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x04c7;
    L_0x04db:
        r3 = b.g.b.h.c.a.BOTTOM;
        r3 = r1.i(r3);
        r3 = r3.a;
        if (r3 == 0) goto L_0x04fd;
    L_0x04e5:
        r3 = r3.iterator();
    L_0x04e9:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x04fd;
    L_0x04ef:
        r4 = r3.next();
        r4 = (b.g.b.h.c) r4;
        r4 = r4.d;
        r5 = 0;
        r6 = 1;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x04e9;
    L_0x04fd:
        r3 = r1.i(r10);
        r3 = r3.a;
        if (r3 == 0) goto L_0x051d;
    L_0x0505:
        r3 = r3.iterator();
    L_0x0509:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x051d;
    L_0x050f:
        r4 = r3.next();
        r4 = (b.g.b.h.c) r4;
        r4 = r4.d;
        r5 = 0;
        r6 = 1;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x0509;
    L_0x051d:
        r5 = 0;
        r6 = 1;
        if (r22 == 0) goto L_0x0535;
    L_0x0521:
        r3 = r22.iterator();
    L_0x0525:
        r4 = r3.hasNext();
        if (r4 == 0) goto L_0x0535;
    L_0x052b:
        r4 = r3.next();
        r4 = (b.g.b.h.d) r4;
        b.d.i.b(r4, r6, r2, r5);
        goto L_0x0525;
    L_0x0535:
        r3 = 0;
    L_0x0536:
        if (r3 >= r12) goto L_0x056c;
    L_0x0538:
        r4 = r11.get(r3);
        r4 = (b.g.b.h.d) r4;
        r5 = r4.O;
        r7 = 0;
        r8 = r5[r7];
        if (r8 != r0) goto L_0x054b;
    L_0x0545:
        r5 = r5[r6];
        if (r5 != r0) goto L_0x054b;
    L_0x0549:
        r5 = 1;
        goto L_0x054c;
    L_0x054b:
        r5 = 0;
    L_0x054c:
        if (r5 == 0) goto L_0x0568;
    L_0x054e:
        r5 = r4.j0;
        r5 = b.d.i.c(r2, r5);
        r4 = r4.k0;
        r4 = b.d.i.c(r2, r4);
        if (r5 == 0) goto L_0x0568;
    L_0x055c:
        if (r4 == 0) goto L_0x0568;
    L_0x055e:
        r6 = 0;
        r5.d(r6, r4);
        r6 = 2;
        r4.c = r6;
        r2.remove(r5);
    L_0x0568:
        r3 = r3 + 1;
        r6 = 1;
        goto L_0x0536;
    L_0x056c:
        r0 = r2.size();
        r3 = 1;
        if (r0 > r3) goto L_0x0577;
    L_0x0573:
        r4 = r27;
        goto L_0x05eb;
    L_0x0577:
        r0 = r28.m();
        r4 = r27;
        if (r0 != r4) goto L_0x05af;
    L_0x057f:
        r0 = r2.iterator();
        r5 = 0;
        r6 = 0;
    L_0x0585:
        r7 = r0.hasNext();
        if (r7 == 0) goto L_0x05a4;
    L_0x058b:
        r7 = r0.next();
        r7 = (b.g.b.h.l.n) r7;
        r8 = r7.c;
        if (r8 != r3) goto L_0x0597;
    L_0x0595:
        r8 = 0;
        goto L_0x05a2;
    L_0x0597:
        r3 = r1.q0;
        r8 = 0;
        r3 = r7.c(r3, r8);
        if (r3 <= r5) goto L_0x05a2;
    L_0x05a0:
        r5 = r3;
        r6 = r7;
    L_0x05a2:
        r3 = 1;
        goto L_0x0585;
    L_0x05a4:
        r8 = 0;
        if (r6 == 0) goto L_0x05af;
    L_0x05a7:
        r0 = r1.O;
        r0[r8] = r26;
        r1.M(r5);
        goto L_0x05b0;
    L_0x05af:
        r6 = 0;
    L_0x05b0:
        r0 = r28.q();
        if (r0 != r4) goto L_0x05e5;
    L_0x05b6:
        r0 = r2.iterator();
        r2 = 0;
        r3 = 0;
    L_0x05bc:
        r5 = r0.hasNext();
        if (r5 == 0) goto L_0x05da;
    L_0x05c2:
        r5 = r0.next();
        r5 = (b.g.b.h.l.n) r5;
        r7 = r5.c;
        if (r7 != 0) goto L_0x05ce;
    L_0x05cc:
        r8 = 1;
        goto L_0x05bc;
    L_0x05ce:
        r7 = r1.q0;
        r8 = 1;
        r7 = r5.c(r7, r8);
        if (r7 <= r2) goto L_0x05bc;
    L_0x05d7:
        r3 = r5;
        r2 = r7;
        goto L_0x05bc;
    L_0x05da:
        r8 = 1;
        if (r3 == 0) goto L_0x05e5;
    L_0x05dd:
        r0 = r1.O;
        r0[r8] = r26;
        r1.H(r2);
        goto L_0x05e6;
    L_0x05e5:
        r3 = 0;
    L_0x05e6:
        if (r6 != 0) goto L_0x05ed;
    L_0x05e8:
        if (r3 == 0) goto L_0x05eb;
    L_0x05ea:
        goto L_0x05ed;
    L_0x05eb:
        r0 = 0;
        goto L_0x05ee;
    L_0x05ed:
        r0 = 1;
    L_0x05ee:
        if (r0 == 0) goto L_0x062c;
    L_0x05f0:
        r2 = r25;
        if (r2 != r4) goto L_0x060a;
    L_0x05f4:
        r0 = r28.r();
        r3 = r19;
        if (r3 >= r0) goto L_0x0605;
    L_0x05fc:
        if (r3 <= 0) goto L_0x0605;
    L_0x05fe:
        r1.M(r3);
        r5 = 1;
        r1.y0 = r5;
        goto L_0x060c;
    L_0x0605:
        r7 = r28.r();
        goto L_0x060d;
    L_0x060a:
        r3 = r19;
    L_0x060c:
        r7 = r3;
    L_0x060d:
        r5 = r23;
        if (r5 != r4) goto L_0x0627;
    L_0x0611:
        r0 = r28.l();
        r6 = r17;
        if (r6 >= r0) goto L_0x0622;
    L_0x0619:
        if (r6 <= 0) goto L_0x0622;
    L_0x061b:
        r1.H(r6);
        r3 = 1;
        r1.z0 = r3;
        goto L_0x0629;
    L_0x0622:
        r8 = r28.l();
        goto L_0x062a;
    L_0x0627:
        r6 = r17;
    L_0x0629:
        r8 = r6;
    L_0x062a:
        r0 = 1;
        goto L_0x0651;
    L_0x062c:
        r6 = r17;
        r3 = r19;
        r5 = r23;
        r2 = r25;
        goto L_0x064e;
    L_0x0635:
        r26 = r4;
        r4 = r5;
        r24 = r6;
        r5 = r7;
        r2 = r9;
        r6 = r17;
        r3 = r19;
        goto L_0x064e;
    L_0x0641:
        r26 = r4;
        r24 = r6;
        r2 = r9;
        r6 = r17;
        r3 = r19;
        r5 = r20;
        r4 = r22;
    L_0x064e:
        r7 = r3;
        r8 = r6;
        r0 = 0;
    L_0x0651:
        r3 = 64;
        r6 = r1.Y(r3);
        if (r6 != 0) goto L_0x0664;
    L_0x0659:
        r6 = 128; // 0x80 float:1.794E-43 double:6.32E-322;
        r6 = r1.Y(r6);
        if (r6 == 0) goto L_0x0662;
    L_0x0661:
        goto L_0x0664;
    L_0x0662:
        r6 = 0;
        goto L_0x0665;
    L_0x0664:
        r6 = 1;
    L_0x0665:
        r9 = r1.q0;
        java.util.Objects.requireNonNull(r9);
        r10 = 0;
        r9.g = r10;
        r10 = r1.x0;
        if (r10 == 0) goto L_0x0676;
    L_0x0671:
        if (r6 == 0) goto L_0x0676;
    L_0x0673:
        r6 = 1;
        r9.g = r6;
    L_0x0676:
        r6 = r1.l0;
        r9 = r28.m();
        if (r9 == r4) goto L_0x0687;
    L_0x067e:
        r9 = r28.q();
        if (r9 != r4) goto L_0x0685;
    L_0x0684:
        goto L_0x0687;
    L_0x0685:
        r9 = 0;
        goto L_0x0688;
    L_0x0687:
        r9 = 1;
    L_0x0688:
        r10 = 0;
        r1.t0 = r10;
        r1.u0 = r10;
        r11 = r24;
        r10 = 0;
    L_0x0690:
        if (r10 >= r11) goto L_0x06a6;
    L_0x0692:
        r12 = r1.l0;
        r12 = r12.get(r10);
        r12 = (b.g.b.h.d) r12;
        r13 = r12 instanceof b.g.b.h.k;
        if (r13 == 0) goto L_0x06a3;
    L_0x069e:
        r12 = (b.g.b.h.k) r12;
        r12.P();
    L_0x06a3:
        r10 = r10 + 1;
        goto L_0x0690;
    L_0x06a6:
        r10 = r1.Y(r3);
        r12 = r0;
        r0 = 0;
        r13 = 1;
    L_0x06ad:
        if (r13 == 0) goto L_0x08da;
    L_0x06af:
        r14 = 1;
        r15 = r0 + 1;
        r0 = r1.q0;	 Catch:{ Exception -> 0x079b }
        r0.u();	 Catch:{ Exception -> 0x079b }
        r14 = 0;
        r1.t0 = r14;	 Catch:{ Exception -> 0x079b }
        r1.u0 = r14;	 Catch:{ Exception -> 0x079b }
        r0 = r1.q0;	 Catch:{ Exception -> 0x079b }
        r1.g(r0);	 Catch:{ Exception -> 0x079b }
        r0 = 0;
    L_0x06c2:
        if (r0 >= r11) goto L_0x06d6;
    L_0x06c4:
        r14 = r1.l0;	 Catch:{ Exception -> 0x079b }
        r14 = r14.get(r0);	 Catch:{ Exception -> 0x079b }
        r14 = (b.g.b.h.d) r14;	 Catch:{ Exception -> 0x079b }
        r3 = r1.q0;	 Catch:{ Exception -> 0x079b }
        r14.g(r3);	 Catch:{ Exception -> 0x079b }
        r0 = r0 + 1;
        r3 = 64;
        goto L_0x06c2;
    L_0x06d6:
        r0 = r1.q0;	 Catch:{ Exception -> 0x079b }
        r1.R(r0);	 Catch:{ Exception -> 0x079b }
        r0 = r1.A0;	 Catch:{ Exception -> 0x0795 }
        r3 = 5;
        if (r0 == 0) goto L_0x0708;
    L_0x06e0:
        r0 = r0.get();	 Catch:{ Exception -> 0x0795 }
        if (r0 == 0) goto L_0x0708;
    L_0x06e6:
        r0 = r1.A0;	 Catch:{ Exception -> 0x0795 }
        r0 = r0.get();	 Catch:{ Exception -> 0x0795 }
        r0 = (b.g.b.h.c) r0;	 Catch:{ Exception -> 0x0795 }
        r13 = r1.q0;	 Catch:{ Exception -> 0x0795 }
        r14 = r1.E;	 Catch:{ Exception -> 0x0795 }
        r13 = r13.l(r14);	 Catch:{ Exception -> 0x0795 }
        r14 = r1.q0;	 Catch:{ Exception -> 0x0795 }
        r0 = r14.l(r0);	 Catch:{ Exception -> 0x0795 }
        r14 = r1.q0;	 Catch:{ Exception -> 0x0795 }
        r19 = r12;
        r12 = 0;
        r14.f(r0, r13, r12, r3);	 Catch:{ Exception -> 0x0789 }
        r12 = 0;
        r1.A0 = r12;	 Catch:{ Exception -> 0x0789 }
        goto L_0x070a;
    L_0x0708:
        r19 = r12;
    L_0x070a:
        r0 = r1.C0;	 Catch:{ Exception -> 0x0789 }
        if (r0 == 0) goto L_0x0733;
    L_0x070e:
        r0 = r0.get();	 Catch:{ Exception -> 0x0789 }
        if (r0 == 0) goto L_0x0733;
    L_0x0714:
        r0 = r1.C0;	 Catch:{ Exception -> 0x0789 }
        r0 = r0.get();	 Catch:{ Exception -> 0x0789 }
        r0 = (b.g.b.h.c) r0;	 Catch:{ Exception -> 0x0789 }
        r12 = r1.q0;	 Catch:{ Exception -> 0x0789 }
        r13 = r1.G;	 Catch:{ Exception -> 0x0789 }
        r12 = r12.l(r13);	 Catch:{ Exception -> 0x0789 }
        r13 = r1.q0;	 Catch:{ Exception -> 0x0789 }
        r0 = r13.l(r0);	 Catch:{ Exception -> 0x0789 }
        r13 = r1.q0;	 Catch:{ Exception -> 0x0789 }
        r14 = 0;
        r13.f(r12, r0, r14, r3);	 Catch:{ Exception -> 0x0789 }
        r12 = 0;
        r1.C0 = r12;	 Catch:{ Exception -> 0x0789 }
    L_0x0733:
        r0 = r1.B0;	 Catch:{ Exception -> 0x0789 }
        if (r0 == 0) goto L_0x075f;
    L_0x0737:
        r0 = r0.get();	 Catch:{ Exception -> 0x0789 }
        if (r0 == 0) goto L_0x075f;
    L_0x073d:
        r0 = r1.B0;	 Catch:{ Exception -> 0x0789 }
        r0 = r0.get();	 Catch:{ Exception -> 0x0789 }
        r0 = (b.g.b.h.c) r0;	 Catch:{ Exception -> 0x0789 }
        r12 = r1.q0;	 Catch:{ Exception -> 0x0789 }
        r13 = r1.D;	 Catch:{ Exception -> 0x0789 }
        r12 = r12.l(r13);	 Catch:{ Exception -> 0x0789 }
        r13 = r1.q0;	 Catch:{ Exception -> 0x0789 }
        r0 = r13.l(r0);	 Catch:{ Exception -> 0x0789 }
        r13 = r1.q0;	 Catch:{ Exception -> 0x0789 }
        r14 = 0;
        r13.f(r0, r12, r14, r3);	 Catch:{ Exception -> 0x0789 }
        r12 = 0;
        r1.B0 = r12;	 Catch:{ Exception -> 0x0789 }
        goto L_0x075f;
    L_0x075d:
        r3 = 0;
        goto L_0x0799;
    L_0x075f:
        r0 = r1.D0;	 Catch:{ Exception -> 0x0789 }
        if (r0 == 0) goto L_0x078b;
    L_0x0763:
        r0 = r0.get();	 Catch:{ Exception -> 0x0789 }
        if (r0 == 0) goto L_0x078b;
    L_0x0769:
        r0 = r1.D0;	 Catch:{ Exception -> 0x0789 }
        r0 = r0.get();	 Catch:{ Exception -> 0x0789 }
        r0 = (b.g.b.h.c) r0;	 Catch:{ Exception -> 0x0789 }
        r12 = r1.q0;	 Catch:{ Exception -> 0x0789 }
        r13 = r1.F;	 Catch:{ Exception -> 0x0789 }
        r12 = r12.l(r13);	 Catch:{ Exception -> 0x0789 }
        r13 = r1.q0;	 Catch:{ Exception -> 0x0789 }
        r0 = r13.l(r0);	 Catch:{ Exception -> 0x0789 }
        r13 = r1.q0;	 Catch:{ Exception -> 0x0789 }
        r14 = 0;
        r13.f(r12, r0, r14, r3);	 Catch:{ Exception -> 0x0789 }
        r3 = 0;
        r1.D0 = r3;	 Catch:{ Exception -> 0x0793 }
        goto L_0x078c;
    L_0x0789:
        r0 = move-exception;
        goto L_0x075d;
    L_0x078b:
        r3 = 0;
    L_0x078c:
        r0 = r1.q0;	 Catch:{ Exception -> 0x0793 }
        r0.q();	 Catch:{ Exception -> 0x0793 }
        r13 = 1;
        goto L_0x07b8;
    L_0x0793:
        r0 = move-exception;
        goto L_0x0799;
    L_0x0795:
        r0 = move-exception;
        r19 = r12;
        goto L_0x075d;
    L_0x0799:
        r13 = 1;
        goto L_0x079f;
    L_0x079b:
        r0 = move-exception;
        r19 = r12;
        r3 = 0;
    L_0x079f:
        r0.printStackTrace();
        r12 = java.lang.System.out;
        r14 = new java.lang.StringBuilder;
        r14.<init>();
        r3 = "EXCEPTION : ";
        r14.append(r3);
        r14.append(r0);
        r0 = r14.toString();
        r12.println(r0);
    L_0x07b8:
        if (r13 == 0) goto L_0x07e2;
    L_0x07ba:
        r0 = r1.q0;
        r3 = 2;
        r12 = 0;
        r16[r3] = r12;
        r3 = 64;
        r12 = r1.Y(r3);
        r1.O(r0, r12);
        r13 = r1.l0;
        r13 = r13.size();
        r14 = 0;
    L_0x07d0:
        if (r14 >= r13) goto L_0x07fa;
    L_0x07d2:
        r3 = r1.l0;
        r3 = r3.get(r14);
        r3 = (b.g.b.h.d) r3;
        r3.O(r0, r12);
        r14 = r14 + 1;
        r3 = 64;
        goto L_0x07d0;
    L_0x07e2:
        r0 = r1.q0;
        r1.O(r0, r10);
        r0 = 0;
    L_0x07e8:
        if (r0 >= r11) goto L_0x07fa;
    L_0x07ea:
        r3 = r1.l0;
        r3 = r3.get(r0);
        r3 = (b.g.b.h.d) r3;
        r12 = r1.q0;
        r3.O(r12, r10);
        r0 = r0 + 1;
        goto L_0x07e8;
    L_0x07fa:
        if (r9 == 0) goto L_0x0862;
    L_0x07fc:
        r0 = 8;
        if (r15 >= r0) goto L_0x0862;
    L_0x0800:
        r3 = 2;
        r0 = r16[r3];
        if (r0 == 0) goto L_0x0862;
    L_0x0805:
        r0 = 0;
        r12 = 0;
        r13 = 0;
    L_0x0808:
        if (r0 >= r11) goto L_0x082d;
    L_0x080a:
        r14 = r1.l0;
        r14 = r14.get(r0);
        r14 = (b.g.b.h.d) r14;
        r3 = r14.U;
        r21 = r14.r();
        r3 = r21 + r3;
        r12 = java.lang.Math.max(r12, r3);
        r3 = r14.V;
        r14 = r14.l();
        r14 = r14 + r3;
        r13 = java.lang.Math.max(r13, r14);
        r0 = r0 + 1;
        r3 = 2;
        goto L_0x0808;
    L_0x082d:
        r0 = r1.X;
        r0 = java.lang.Math.max(r0, r12);
        r3 = r1.Y;
        r3 = java.lang.Math.max(r3, r13);
        if (r2 != r4) goto L_0x084d;
    L_0x083b:
        r12 = r28.r();
        if (r12 >= r0) goto L_0x084d;
    L_0x0841:
        r1.M(r0);
        r0 = r1.O;
        r12 = 0;
        r0[r12] = r4;
        r0 = 1;
        r19 = 1;
        goto L_0x084e;
    L_0x084d:
        r0 = 0;
    L_0x084e:
        if (r5 != r4) goto L_0x0863;
    L_0x0850:
        r12 = r28.l();
        if (r12 >= r3) goto L_0x0863;
    L_0x0856:
        r1.H(r3);
        r0 = r1.O;
        r3 = 1;
        r0[r3] = r4;
        r0 = 1;
        r19 = 1;
        goto L_0x0863;
    L_0x0862:
        r0 = 0;
    L_0x0863:
        r3 = r1.X;
        r12 = r28.r();
        r3 = java.lang.Math.max(r3, r12);
        r12 = r28.r();
        if (r3 <= r12) goto L_0x087e;
    L_0x0873:
        r1.M(r3);
        r0 = r1.O;
        r3 = 0;
        r0[r3] = r26;
        r0 = 1;
        r19 = 1;
    L_0x087e:
        r3 = r1.Y;
        r12 = r28.l();
        r3 = java.lang.Math.max(r3, r12);
        r12 = r28.l();
        if (r3 <= r12) goto L_0x089a;
    L_0x088e:
        r1.H(r3);
        r0 = r1.O;
        r3 = 1;
        r0[r3] = r26;
        r0 = 1;
        r19 = 1;
        goto L_0x089b;
    L_0x089a:
        r3 = 1;
    L_0x089b:
        if (r19 != 0) goto L_0x08d2;
    L_0x089d:
        r12 = r1.O;
        r13 = 0;
        r12 = r12[r13];
        if (r12 != r4) goto L_0x08b8;
    L_0x08a4:
        if (r7 <= 0) goto L_0x08b8;
    L_0x08a6:
        r12 = r28.r();
        if (r12 <= r7) goto L_0x08b8;
    L_0x08ac:
        r1.y0 = r3;
        r0 = r1.O;
        r0[r13] = r26;
        r1.M(r7);
        r0 = 1;
        r19 = 1;
    L_0x08b8:
        r12 = r1.O;
        r12 = r12[r3];
        if (r12 != r4) goto L_0x08d2;
    L_0x08be:
        if (r8 <= 0) goto L_0x08d2;
    L_0x08c0:
        r12 = r28.l();
        if (r12 <= r8) goto L_0x08d2;
    L_0x08c6:
        r1.z0 = r3;
        r0 = r1.O;
        r0[r3] = r26;
        r1.H(r8);
        r12 = 1;
        r13 = 1;
        goto L_0x08d5;
    L_0x08d2:
        r13 = r0;
        r12 = r19;
    L_0x08d5:
        r0 = r15;
        r3 = 64;
        goto L_0x06ad;
    L_0x08da:
        r19 = r12;
        r1.l0 = r6;
        if (r19 == 0) goto L_0x08e8;
    L_0x08e0:
        r0 = r1.O;
        r3 = 0;
        r0[r3] = r2;
        r2 = 1;
        r0[r2] = r5;
    L_0x08e8:
        r0 = r1.q0;
        r0 = r0.l;
        r1.D(r0);
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: b.g.b.h.e.P():void");
    }

    public void Q(d dVar, int i) {
        b[] bVarArr;
        b[] bVarArr2;
        int i2;
        if (i == 0) {
            i = this.t0 + 1;
            bVarArr = this.w0;
            if (i >= bVarArr.length) {
                this.w0 = (b[]) Arrays.copyOf(bVarArr, bVarArr.length * 2);
            }
            bVarArr2 = this.w0;
            i2 = this.t0;
            bVarArr2[i2] = new b(dVar, 0, this.p0);
            this.t0 = i2 + 1;
        } else if (i == 1) {
            i = this.u0 + 1;
            bVarArr = this.v0;
            if (i >= bVarArr.length) {
                this.v0 = (b[]) Arrays.copyOf(bVarArr, bVarArr.length * 2);
            }
            bVarArr2 = this.v0;
            i2 = this.u0;
            bVarArr2[i2] = new b(dVar, 1, this.p0);
            this.u0 = i2 + 1;
        }
    }

    public boolean R(d dVar) {
        int i;
        d dVar2;
        d.a aVar = d.a.FIXED;
        d.a aVar2 = d.a.WRAP_CONTENT;
        boolean Y = Y(64);
        d(dVar, Y);
        int size = this.l0.size();
        Object obj = null;
        for (i = 0; i < size; i++) {
            d dVar3 = (d) this.l0.get(i);
            boolean[] zArr = dVar3.N;
            zArr[0] = false;
            zArr[1] = false;
            if (dVar3 instanceof a) {
                obj = 1;
            }
        }
        if (obj != null) {
            for (i = 0; i < size; i++) {
                dVar2 = (d) this.l0.get(i);
                if (dVar2 instanceof a) {
                    a aVar3 = (a) dVar2;
                    for (int i2 = 0; i2 < aVar3.m0; i2++) {
                        d dVar4 = aVar3.l0[i2];
                        int i3 = aVar3.n0;
                        if (i3 == 0 || i3 == 1) {
                            dVar4.N[0] = true;
                        } else if (i3 == 2 || i3 == 3) {
                            dVar4.N[1] = true;
                        }
                    }
                }
            }
        }
        for (i = 0; i < size; i++) {
            dVar2 = (d) this.l0.get(i);
            if (dVar2.c()) {
                dVar2.d(dVar, Y);
            }
        }
        if (d.p) {
            HashSet hashSet = new HashSet();
            for (i = 0; i < size; i++) {
                dVar2 = (d) this.l0.get(i);
                if (!dVar2.c()) {
                    hashSet.add(dVar2);
                }
            }
            b(this, dVar, hashSet, m() == aVar2 ? 0 : 1, false);
            Iterator it = hashSet.iterator();
            while (it.hasNext()) {
                d dVar5 = (d) it.next();
                i.a(this, dVar, dVar5);
                dVar5.d(dVar, Y);
            }
        } else {
            for (i = 0; i < size; i++) {
                dVar2 = (d) this.l0.get(i);
                if (dVar2 instanceof e) {
                    d.a[] aVarArr = dVar2.O;
                    d.a aVar4 = aVarArr[0];
                    d.a aVar5 = aVarArr[1];
                    if (aVar4 == aVar2) {
                        aVarArr[0] = aVar;
                    }
                    if (aVar5 == aVar2) {
                        aVarArr[1] = aVar;
                    }
                    dVar2.d(dVar, Y);
                    if (aVar4 == aVar2) {
                        dVar2.I(aVar4);
                    }
                    if (aVar5 == aVar2) {
                        dVar2.L(aVar5);
                    }
                } else {
                    i.a(this, dVar, dVar2);
                    if (!dVar2.c()) {
                        dVar2.d(dVar, Y);
                    }
                }
            }
        }
        if (this.t0 > 0) {
            i.a(this, dVar, null, 0);
        }
        if (this.u0 > 0) {
            i.a(this, dVar, null, 1);
        }
        return true;
    }

    public void S(c cVar) {
        WeakReference weakReference = this.D0;
        if (weakReference == null || weakReference.get() == null || cVar.c() > ((c) this.D0.get()).c()) {
            this.D0 = new WeakReference(cVar);
        }
    }

    public void T(c cVar) {
        WeakReference weakReference = this.C0;
        if (weakReference == null || weakReference.get() == null || cVar.c() > ((c) this.C0.get()).c()) {
            this.C0 = new WeakReference(cVar);
        }
    }

    public void U(c cVar) {
        WeakReference weakReference = this.A0;
        if (weakReference == null || weakReference.get() == null || cVar.c() > ((c) this.A0.get()).c()) {
            this.A0 = new WeakReference(cVar);
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:35:0x00e3  */
    /* JADX WARNING: Removed duplicated region for block: B:47:0x0109  */
    /* JADX WARNING: Removed duplicated region for block: B:35:0x00e3  */
    /* JADX WARNING: Removed duplicated region for block: B:47:0x0109  */
    public boolean V(boolean r14, int r15) {
        /*
        r13 = this;
        r0 = r13.n0;
        r1 = b.g.b.h.d.a.MATCH_PARENT;
        r2 = b.g.b.h.d.a.WRAP_CONTENT;
        r3 = b.g.b.h.d.a.FIXED;
        r4 = 1;
        r14 = r14 & r4;
        r5 = r0.a;
        r6 = 0;
        r5 = r5.k(r6);
        r7 = r0.a;
        r7 = r7.k(r4);
        r8 = r0.a;
        r8 = r8.s();
        r9 = r0.a;
        r9 = r9.t();
        if (r14 == 0) goto L_0x0085;
    L_0x0025:
        if (r5 == r2) goto L_0x0029;
    L_0x0027:
        if (r7 != r2) goto L_0x0085;
    L_0x0029:
        r10 = r0.e;
        r10 = r10.iterator();
    L_0x002f:
        r11 = r10.hasNext();
        if (r11 == 0) goto L_0x0046;
    L_0x0035:
        r11 = r10.next();
        r11 = (b.g.b.h.l.o) r11;
        r12 = r11.f;
        if (r12 != r15) goto L_0x002f;
    L_0x003f:
        r11 = r11.k();
        if (r11 != 0) goto L_0x002f;
    L_0x0045:
        r14 = 0;
    L_0x0046:
        if (r15 != 0) goto L_0x0067;
    L_0x0048:
        if (r14 == 0) goto L_0x0085;
    L_0x004a:
        if (r5 != r2) goto L_0x0085;
    L_0x004c:
        r14 = r0.a;
        r2 = r14.O;
        r2[r6] = r3;
        r2 = r0.d(r14, r6);
        r14.M(r2);
        r14 = r0.a;
        r2 = r14.d;
        r2 = r2.e;
        r14 = r14.r();
        r2.c(r14);
        goto L_0x0085;
    L_0x0067:
        if (r14 == 0) goto L_0x0085;
    L_0x0069:
        if (r7 != r2) goto L_0x0085;
    L_0x006b:
        r14 = r0.a;
        r2 = r14.O;
        r2[r4] = r3;
        r2 = r0.d(r14, r4);
        r14.H(r2);
        r14 = r0.a;
        r2 = r14.e;
        r2 = r2.e;
        r14 = r14.l();
        r2.c(r14);
    L_0x0085:
        if (r15 != 0) goto L_0x00ac;
    L_0x0087:
        r14 = r0.a;
        r2 = r14.O;
        r9 = r2[r6];
        if (r9 == r3) goto L_0x0093;
    L_0x008f:
        r2 = r2[r6];
        if (r2 != r1) goto L_0x00b9;
    L_0x0093:
        r14 = r14.r();
        r14 = r14 + r8;
        r1 = r0.a;
        r1 = r1.d;
        r1 = r1.i;
        r1.c(r14);
        r1 = r0.a;
        r1 = r1.d;
        r1 = r1.e;
        r14 = r14 - r8;
        r1.c(r14);
        goto L_0x00d3;
    L_0x00ac:
        r14 = r0.a;
        r2 = r14.O;
        r8 = r2[r4];
        if (r8 == r3) goto L_0x00bb;
    L_0x00b4:
        r2 = r2[r4];
        if (r2 != r1) goto L_0x00b9;
    L_0x00b8:
        goto L_0x00bb;
    L_0x00b9:
        r14 = 0;
        goto L_0x00d4;
    L_0x00bb:
        r14 = r14.l();
        r14 = r14 + r9;
        r1 = r0.a;
        r1 = r1.e;
        r1 = r1.i;
        r1.c(r14);
        r1 = r0.a;
        r1 = r1.e;
        r1 = r1.e;
        r14 = r14 - r9;
        r1.c(r14);
    L_0x00d3:
        r14 = 1;
    L_0x00d4:
        r0.g();
        r1 = r0.e;
        r1 = r1.iterator();
    L_0x00dd:
        r2 = r1.hasNext();
        if (r2 == 0) goto L_0x00fd;
    L_0x00e3:
        r2 = r1.next();
        r2 = (b.g.b.h.l.o) r2;
        r3 = r2.f;
        if (r3 == r15) goto L_0x00ee;
    L_0x00ed:
        goto L_0x00dd;
    L_0x00ee:
        r3 = r2.b;
        r8 = r0.a;
        if (r3 != r8) goto L_0x00f9;
    L_0x00f4:
        r3 = r2.g;
        if (r3 != 0) goto L_0x00f9;
    L_0x00f8:
        goto L_0x00dd;
    L_0x00f9:
        r2.e();
        goto L_0x00dd;
    L_0x00fd:
        r1 = r0.e;
        r1 = r1.iterator();
    L_0x0103:
        r2 = r1.hasNext();
        if (r2 == 0) goto L_0x0136;
    L_0x0109:
        r2 = r1.next();
        r2 = (b.g.b.h.l.o) r2;
        r3 = r2.f;
        if (r3 == r15) goto L_0x0114;
    L_0x0113:
        goto L_0x0103;
    L_0x0114:
        if (r14 != 0) goto L_0x011d;
    L_0x0116:
        r3 = r2.b;
        r8 = r0.a;
        if (r3 != r8) goto L_0x011d;
    L_0x011c:
        goto L_0x0103;
    L_0x011d:
        r3 = r2.h;
        r3 = r3.j;
        if (r3 != 0) goto L_0x0124;
    L_0x0123:
        goto L_0x0135;
    L_0x0124:
        r3 = r2.i;
        r3 = r3.j;
        if (r3 != 0) goto L_0x012b;
    L_0x012a:
        goto L_0x0135;
    L_0x012b:
        r3 = r2 instanceof b.g.b.h.l.c;
        if (r3 != 0) goto L_0x0103;
    L_0x012f:
        r2 = r2.e;
        r2 = r2.j;
        if (r2 != 0) goto L_0x0103;
    L_0x0135:
        r4 = 0;
    L_0x0136:
        r14 = r0.a;
        r14.I(r5);
        r14 = r0.a;
        r14.L(r7);
        return r4;
        */
        throw new UnsupportedOperationException("Method not decompiled: b.g.b.h.e.V(boolean, int):boolean");
    }

    public void W() {
        this.n0.b = true;
    }

    public boolean Y(int i) {
        return (this.x0 & i) == i;
    }

    public void Z(int i) {
        this.x0 = i;
        d.p = Y(512);
    }
}
